<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Base extends Controller_Template {
    
    protected $auth;
    protected $user;

    public function before() 
    {
        parent::before();
        $settings = Kohana::$config->load('settings');
        
        $this->auth = Auth::instance();
        $this->user = $this->auth->get_user();
        
        $this->template->site_name = $settings->site_name;
        $this->template->site_description = $settings->site_description;
        $this->template->page_title = null;
        $this->template->auth_user = $this->user;

        $this->template->styles = array(
            'media/css/bootstrap.min.css' ,
            'media/css/bootstrap-responsive.min.css',
            'media/css/font-awesome.css',
            'media/css/jquery-ui-1.10.0.custom.css',
            'media/css/theme.css',
        );

        $this->template->scripts = array(
            'media/js/jquery.min.js',
            'media/js/jquery-ui.min.js',
            'media/js/modernizr.min.js',
            'media/js/bootstrap.min.js',
        );

    }
    
}

